/*
 * Copyright (c) 2009. Silenus Consultoria, S.L.
 */
package es.silenus.detecta.dao;

import es.silenus.detecta.model.Organization;

import java.util.List;


/**
 * Organization DAO.
 *
 * @author <a href="mailto:dgarcia@silenus-consultoria.es">Daniel Garc&iacute;a</a>
 * @since 31-mar-2009 13:01:28
 */
public interface OrganizationDAO extends ReadWriteDAO<Organization, Integer> {
	/**
	 * Find an organization by its name
	 *
	 * @param name the name
	 *
	 * @return the located organization or, if not found, null
	 */
	public Organization findByName(String name);

	/**
	 * Retrieve the names.
	 *
	 * @return the organization names sorted alphabetically.
	 */
	public List<String> findNames();

	/**
	 * Retrieve the user login names, given an organization name.
	 *
	 * @param name the name.
	 *
	 * @return the user logins.
	 */
	public List<String> findUserLogins(final String name);
}
